package com.gopay.common.domain.bank.boc.bcdl.person.req;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.BeanUtils;

import com.gopay.common.domain.bank.boc.bcdl.Trans;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("trn-b2e0061-rq")
public class TransReqPerson extends Trans {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6549500210240366489L;

	@XStreamAlias("transtype") 
	private String transtype;
	
	@XStreamImplicit(itemFieldName="b2e0061-rq")
	private List<Inner> inners;
	
	public TransReqPerson() {
		// TODO Auto-generated constructor stub
	}
	
	public TransReqPerson(String transtype, List<ReqPersonParam> params){
		this.transtype = transtype;
		this.inners = new ArrayList<Inner>();
		for(ReqPersonParam param:params){
			Inner inner = new Inner();
			BeanUtils.copyProperties(param,inner);
			inners.add(inner);
		}
	}
	
	@SuppressWarnings("unused")
	private static class Inner implements Serializable{
		
		/**
		 * 
		 */
		private static final long serialVersionUID = 2902694640671427825L;

		@XStreamAlias("insid") 
		private String insid;
		
		@XStreamAlias("obssid") 
		private String obssid;
		
		@XStreamAlias("trnamt") 
		private String trnamt;
		
		@XStreamAlias("trncur") 
		private String trncur;
		
		@XStreamAlias("priolv") 
		private String priolv;
		
		@XStreamAlias("cuspriolv") 
		private String cuspriolv;
		
		@XStreamAlias("furinfo") 
		private String furinfo;
		
		@XStreamAlias("trfdate") 
		private String trfdate;
		
		@XStreamAlias("trftime") 
		private String trftime;
		
		@XStreamAlias("comacn") 
		private String comacn;
		
		@XStreamAlias("bocflag")
		private String bocflag;
		
		@XStreamAlias("fractn")
		private ReqPersonDrawee fractn;
		
		@XStreamAlias("toactn")
		private ReqPersonPayee toactn;

		public String getInsid() {
			return insid;
		}

		public void setInsid(String insid) {
			this.insid = insid;
		}

		public String getObssid() {
			return obssid;
		}

		public void setObssid(String obssid) {
			this.obssid = obssid;
		}

		public String getTrnamt() {
			return trnamt;
		}

		public void setTrnamt(String trnamt) {
			this.trnamt = trnamt;
		}

		public String getTrncur() {
			return trncur;
		}

		public void setTrncur(String trncur) {
			this.trncur = trncur;
		}

		public String getPriolv() {
			return priolv;
		}

		public void setPriolv(String priolv) {
			this.priolv = priolv;
		}

		public String getCuspriolv() {
			return cuspriolv;
		}

		public void setCuspriolv(String cuspriolv) {
			this.cuspriolv = cuspriolv;
		}

		public String getFurinfo() {
			return furinfo;
		}

		public void setFurinfo(String furinfo) {
			this.furinfo = furinfo;
		}

		public String getTrfdate() {
			return trfdate;
		}

		public void setTrfdate(String trfdate) {
			this.trfdate = trfdate;
		}

		public String getTrftime() {
			return trftime;
		}

		public void setTrftime(String trftime) {
			this.trftime = trftime;
		}

		public String getComacn() {
			return comacn;
		}

		public void setComacn(String comacn) {
			this.comacn = comacn;
		}

		public String getBocflag() {
			return bocflag;
		}

		public void setBocflag(String bocflag) {
			this.bocflag = bocflag;
		}

		public ReqPersonDrawee getFractn() {
			return fractn;
		}

		public void setFractn(ReqPersonDrawee fractn) {
			this.fractn = fractn;
		}

		public ReqPersonPayee getToactn() {
			return toactn;
		}

		public void setToactn(ReqPersonPayee toactn) {
			this.toactn = toactn;
		}
	}
}
